﻿using System;
using System.Windows.Forms;

namespace Editor.ModeToolbars
{
    internal partial class ModeEnvironment : UserControl, IModeToolbar
    {
        private EditorDocument m_Document;
        private bool m_bPhysicsRunning = false;

        public ModeEnvironment()
        {
            InitializeComponent();
        }

        public void InitializeMode(EditorDocument document)
        {
            m_Document = document;
        }

        public void EnterMode()
        {
            this.Visible = true;
        }

        public void ExitMode()
        {
            this.Visible = false;
        }

        private void btnPhysics_Click(object sender, EventArgs e)
        {
            if (!m_bPhysicsRunning)
            {
                m_bPhysicsRunning = true;
                btnPhysics.Text = "Stop Physics";
            }
            else
            {
                m_bPhysicsRunning = false;
                btnPhysics.Text = "Start Physics";
            }
        }
    }
}
